export default {
    totalCount(state) {
        //求所有的总商品数量

        return  state.cartFoods.reduce((pre, current) => pre + current.count, 0)

    },

    totalPrice(state) {
        return  state.cartFoods.reduce((pre, current) => pre + current.count*current.price, 0)  
    }


}